<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>UEditor Demo</title>
</head>
<body>
<script id="editor-container" type="text/plain"></script>
<!-- <script src="./dist/ueditor.config.js"></script> -->
<!-- <script src="./dist/ueditor.all.js"></script> -->
<!-- <script src="./dist/lang/zh-cn/zh-cn.js"></script> -->
<script src="./dist-min/ueditor.config.min.js"></script>
<script src="./dist-min/ueditor.all.min.js"></script>
<script src="./dist-min/lang/zh-cn/zh-cn.min.js"></script>
<script>

  window.onload = function () {
    const editor = UE.getEditor('editor-container', {
      serverUrl: `https://soacai.isv-dev.youzan.com/api/material/image/upload`,
      serverHeaders: {
        'Real-Referer': window.location.href,
        'isv-token': '19ddbc03-bdf5-4c00-8a79-30439c9e6de5',
      },
      imageMaxSize: 0.01,
      enableAutoSave: false,
      maximumWords: 10000,
      autoHeightEnabled: false, // 不自动增高
      initialFrameHeight: 300,  // 初始化高度
      initialFrameWidth: 900,   // 初始化款单
      uploadSuccess: function (res) {
        return res.code === 0 ? res.data.url : '';
      }
    })

    editor.ready(() => {
      console.log('编辑器初始化完成')
      editor.setContent('<p>hello world</p>')
    })
  }
</script>
</body>
</html>
